<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>普通资产管理</title>
		<!-- <link rel="stylesheet" href="../layui/css/layui.css">
  <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>-->
	</head>
	
	<body>
		<div class="layui-elem-quote">
			<span class="layui-breadcrumb">
				<a href="">首页</a>
                <a href="">资产流转管理</a>
                <a href=""><cite>车辆资产流转管理</cite></a>
			</span>
		</div>
		<div>
			<form class="layui-form">
			<div class="layui-inline"
			<label class="layui-form-label">资产操作：</label>
			<div class="layui-input-inline">
			<select id="selectId6">
								
							</select>
		
		</div>
		</div>
		
			<div class="layui-inline">
			<label class="layui-form-label">资产名称：</label>
			<div class="layui-input-inline">
			<input type="text" id="" class="layui-input"/>
		</div>
		</div>
		    <div class="layui-inline">
			<label class="layui-form-label">批次编号：</label>
			<div class="layui-input-inline">
			<input type="text" id="" class="layui-input" />
		</div>
		</div>
		<div class="layui-inline">
			<div class="layui-input-inline">
				<a href="" class="layui-btn layui-btn-success"><span class="layui-icon layui-icon-search"></span>检索Search</a>
			</div>
		</div>
  </form>
</div>
		
	<div class="layui-card">
		<div class="layui-card-header">
			可领用资产列表
		</div>
		<div class="layui-card-body">
          	<table id="demo" lay-filter="test"></table>
          	</div>
          	<script type="text/html" id="buttonTpl">
          		<a class="layui-btn layui-bg-blue layui-btn-xs" lay-event="detail">领用</a>
          	</script>
          </div>
         </div>
        <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
		<script src="layui/layui.all.js"></script>
		<script>
			layui.use(['element','form','laypage','table'],
			function(){
				var element = layui.element;
				var form = layui.form;
				var laypage = layui.laypage;
				var table=layui.table;
				/*laypage.render({
					elem:'pageId'
					,count:50
				});*/
 table.render({
    elem: '#demo'
    ,height: 420
    ,url: 'dataJSON/carAssetManage.json' //数据接口
    ,page: true //开启分页
    ,limit:5
    ,limits:[5,10,15,20]
    ,loading:false
    ,done:function(res,curr,count){
    	console.log(res,curr,count);
    }
    ,cols: [[ //表头
     /* {field: 'id', title: '', width:260, sort: true, fixed: 'left'}*/
      {field: 'id', title: '资产名称', width:200}
      ,{field: 'showValue', title: '批次编号', width:260}
      ,{field: 'class', title: '单价（￥）', width:160,}
      ,{field: 'desc', title: '当前库存量', width:140} 
      ,{field: 'name', title: '采购人', width:140} 
      ,{field: 'data', title: '入库日期', width:180} 
      ,{field: 'stadus', title: '领用操作', width:160,height:30,templet:'#buttonTpl'} 
     
    ]]
  });
  	$(function(){	
			$.ajax({
				type:"get",
				url:"dataJSON/selectDict6.json",
				success:function(result){
					var seoption="";
					$.each(result.select,function(index,value){
						seoption+="<option>"+value+"</option>";
					})
					    console.log(seoption)
						$("#selectId6").append(seoption);
						form.render();
				    }
			});
			})	
 /*table.on('checkbox(test)', function(obj){
  console.log(obj.checked); //当前是否选中状态
  console.log(obj.data); //选中行的相关数据
  console.log(obj.type); //如果触发的是全选，则为：all，如果触发的是单选，则为：one
});*/
  
});
		function toIndex(){
				$('#mainFrame').load('../okair/welcome.html');
			}
	</script>
		
	</body>
</html>
